<?php

/**
 * Modification du path include à la racine du projet
 */
set_include_path(dirname(__FILE__));

/**
 * Inclusion des modèles
 */
require "app/utils/Config.php";
require "app/models/DegreFermentation.php";
require "app/models/TypeBiere.php";
require "app/models/Biere.php";
require "app/models/Pays.php";
require "app/models/Parser.php";
require "app/models/Note.php";
require "app/models/Commentaire.php";
require "app/utils/simple_html_dom.php";

/**
 * Inclusion des controlleurs
 */
require "app/controllers/Controller.php";
require "app/controllers/ParserController.php";
require "app/controllers/MainController.php";
require "app/controllers/BiereNoteController.php";
require "app/controllers/BiereCommentaireController.php";
require "app/controllers/ErrorController.php";


/**
 * Inclusion des class annexes
 */
require "app/utils/Notification.php";
require "app/utils/Pagination.php";

/**
 * Inclusion du router
 */
require "app/routers/router.php";

/**
 * Lancement de l'application
 * @var GlobalController
 */

session_start();

$controllers = array();
$controllers["main"] = new MainController();
$controllers["note"] = new BiereNoteController();
$controllers["parser"] = new ParserController();
$controllers["commentaire"] = new BiereCommentaireController();
$controllers["error"] = new ErrorController();
$router = new Router($controllers, array('defaultController' => 'main', 'defaultAction' => 'index'), array('errorController' => 'error', 'error404Action' => 'error404Action'));
$router->start();

?>